<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "order_status_log".
 *
 * @property integer $id
 * @property string $orderno
 * @property integer $status
 * @property integer $sub_status
 * @property string $opt_name
 * @property string $opt_time
 * @property string $remark
 * @property integer $user_id
 * @property string $phone
 */
class OrderStatusLog extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'order_status_log';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['status', 'sub_status'], 'integer'],
            [['opt_time','user_id'], 'safe'],
            [['orderno'], 'string', 'max' => 20],
            [['opt_name'], 'string', 'max' => 50],
            [['remark'], 'string', 'max' => 255],
            [['phone'], 'string', 'max' => 11],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'orderno' => '订单号',
            'status' => '主状态  1-待领件，2-已接收数据，3-已接收实物，4-派件员配送中，5-签收，6-异常',
            'sub_status' => '子状态  当主状态是6时子状态才会变化',
            'opt_name' => '操作人',
            'opt_time' => '操作时间',
            'remark' => '备注',
            'user_id' => '操作者id',
            'phone'   => '手机号',
        ];
    }
}
